package com.example.controller;

import com.example.modle.User;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class ThreadtestController {
    @GetMapping("/threadtest")
    public User testThread(){

        return User.builder()
                .age(18)
                .name("evan")
                .build();

    }

    @GetMapping("/api/message")
    public Map<String,Object> message(){
        Map<String,Object> response = new HashMap<>();
        response.put("name","Evan");
        response.put("message","you are nbest");

        return response;

    }

}
